#!/usr/bin/python
# -*- coding: utf-8 -*-
# @Time    : 2021/7/4 21:03
# @Author  : Aaron
# @File    : base_page
# @Software: PyCharm
from dataclasses import dataclass
from selenium import webdriver

@dataclass
class BasePage:
    driver: webdriver = None

    def __post_init__(self):
        if self.driver is None:
            self.driver = webdriver.Chrome()
            self.driver.implicitly_wait(3)
        else:
            self.driver = self.driver

    def close_driver(self):
        self.driver.close()


